package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.logic.bussiness.DaoHelper;
import com.yanqu.road.entity.task.UserTaskActive;
import com.yanqu.road.entity.task.UserTaskData;

import java.util.Map;

public class UserTaskBussiness {

	public static Map<Integer, UserTaskData> getUserTaskDataMap(long userId) {
		return DaoHelper.getUserTaskDaoImpl().getUserTaskDataMap(userId);
	}

	public static boolean addUserTaskData(UserTaskData userTaskData) {
		return DaoHelper.getUserTaskDaoImpl().add(userTaskData);
	}

	public static boolean updateUserTaskData(UserTaskData userTaskData) {
		return DaoHelper.getUserTaskDaoImpl().update(userTaskData);
	}

	public static boolean deleteUserTaskData(long userId, int taskId) {
		return DaoHelper.getUserTaskDaoImpl().deleteUserTaskData(userId, taskId);
	}

	public static UserTaskActive getUserTaskActive(long userId) {
		return DaoHelper.getUserTaskActiveDaoImpl().getUserTaskActive(userId);
	}

	public static boolean addUserTaskActive(UserTaskActive userTaskActive) {
		return DaoHelper.getUserTaskActiveDaoImpl().add(userTaskActive);
	}

	public static boolean updateUserTaskActive(UserTaskActive userTaskActive) {
		return DaoHelper.getUserTaskActiveDaoImpl().update(userTaskActive);
	}
}
